{% extends  "warehouse/base.html" %}
{% load erpdata %}
{% load paginator %}
{% load static %}

{% block title %}
<title>{{title}}-smallerp</title>
{% endblock %}

{% block contents %}

<div class="box_o " >
	<div class="rb_1">
	</div>
	<div class="rb_2">
	</div>
	<div class="rb_3">
	</div>
	<div class="rb">
		<h4> 物品购买记录 </h4>
		<div class="box_i " >
			<div class="fright">
			</div>
			<img src="{% get_static_prefix %}stickies.ico"   width="16px" border="0">
			&nbsp;
			<hr>
			<table class="zebra-table">
				<tr class="even">
					<th>编号</th>
					<th>名称</th>
					<th>供应商</th>
					<th>数量</th>
					<th>价格</th>
					<th>采购时间</th>
					<th>操作</th>
				</tr>
				{% for item in items %}
				<tr class="{% cycle 'odd' 'even' %}">
					<td>{{ item.id }}</td>
					<td>{{ item.POD_Commodity.Com_Name }}</td>
					<td>{{ item.POD_PurchaseOrder.PO_Supplier }}</td>
					<td>{{ item.POD_Quanlity }}</td>
					<td>{{ item.POD_Price }}</td>
					<td>{{ item.POD_PurchaseOrder.PO_LastModify_Date|date:"D Y-m-d H:i:s"  }}</td>
					<td>
					<a class="p" href="/erp/po/{{ item.POD_PurchaseOrder.id }}">详细</a>
					</td>
				</tr>
				{% endfor %}
				{% if show_pager %}
				<tr class='even'>
					<td class="hf" colspan="10" align="left">{% paginator queryparam 3 %}</td>
				</tr>
				{% endif %}

				<tr class="even">
					<td colspan="10" style="padding: 1px 0pt 1px;">
					<a href="{{current_url}}" class="g{%if sort == '0'%}_disabled{%endif%}">默认排序</a>
					<a href="{{current_url}}?s=0" class="g{%if sort == '0'%}_disabled{%endif%}">采购时间</a>
					<a href="{{current_url}}?s=1" class="g{%if sort == '1'%}_disabled{%endif%}">价格降序</a>
					<a href="{{current_url}}?s=2" class="g{%if sort == '2'%}_disabled{%endif%}">价格升序</a>
					</td>
				</tr>
			</table>
		</div>
		<H4>
		<a class="p" href="{{ back_url }}"> 返回 </a>
		<a class="fright" href="{{current_url}}" class="p">&nbsp;</a>&nbsp;&nbsp;
		</h4></H4>
	</div>
	<div class="rb_4">
	</div>
	<div class="rb_5">
	</div>
	<div class="rb_1">
	</div>
</div>
{% endblock %}